FIELD OF THE INVENTION
This invention relates to the regeneration of process control flow diagrams for programmable logic controllers.
Distributed process control systems, widely used in many industrial applications, make widespread use of programmable logic controllers, PLCs, otherwise known as LCUs (logic control units). In order to provide for programming of such controllers by or under the supervision of process control engineers who may not possess computer programming skills, techniques for configuring controllers without the use of conventional programming languages have been developed. A common approach is to utilize objects known as function blocks to define the control system configuration to be implemented in an LCU. This approach is described in some detail in the book "Distributed Control System", M. P. Lukas, published by MacMillan, ISBN 0-442-26060-2, pages 19-73 and 232-235. Further information, exemplified by reference to commercially available systems, is to be found in the book "Distributed Process control for Industrial Automation", Popovic & Bhatkar, Marcel Dekker Inc., New York, 1990, ISBN 0-8247-8118-X, especially pages 235-247, 334-337, and 566-575.
Initial programming of a PLC using function blocks commonly takes place off-line at a computer work station, using a computer aided design (CAD) program which enables an engineer to produce symbolic drawings which both provide a visually comprehensible display or printout in the form of a drawing, and a drawing file which can be displayed or printed, or compiled to generate object code for installation in the PLC. In practice, however, the resulting code must be debugged and tuned interactively and on-line utilising utilities provided for the purpose, which are capable patching the object code in situ; such utilities typically include a limited decompilation capability in order to facilitate patching. A major problem which arises from this combination of off-line and on-line programming is that of maintaining consistency between record copies of the original drawings and the actual programming of the PLCs to which they relate. If the record copies are not meticulously updated whenever an alteration is made to the object code, they will not accurately reflect the programming of the PLC, and even with rigorously supervised updating procedures there is no positive assurance of correspondence between the drawings and the object code. In practice, updating of record copies is a slow, labour intensive and expensive procedure.
As mentioned above, utilities providing limited decompilation capabilities are available, but as is well known, decompilation or disassembly of object code to provide meaningful source code is extremely difficult and time consuming since much of the information in the original source code which makes it human-comprehensible is discarded during compilation and unless implicit in the object code, is lost and cannot be regenerated. This is particularly true of symbolic and object oriented languages which are designed to assist the programmer or user and facilitate modification, and therefore contain a large amount of data which is redundant when object code is generated. In the case of function-code programming using CAD drawings, conventional decompilation enables the individual function codes, their inputs and outputs and associated parameters to be recognized, so that they can be amended or checked against the original drawings, but the layout and arrangement of the drawing is wholly lost. To the best of applicant's knowledge, no satisfactory system for regenerating the original CAD files used in function block programming exists which does not require massive human intervention to regenerate the data lost during compilation.